

package com.hazelcast.internal.management.events;

import com.hazelcast.internal.json.JsonObject;

import java.util.UUID;

public abstract class AbstractWanAntiEntropyEventBase extends AbstractWanEvent {
    protected final String wanReplicationName;
    protected final String wanPublisherId;
    protected final String mapName;

    AbstractWanAntiEntropyEventBase(UUID uuid, String wanReplicationName, String wanPublisherId, String mapName) {
        super(uuid);
        this.wanReplicationName = wanReplicationName;
        this.wanPublisherId = wanPublisherId;
        this.mapName = mapName;
    }

    public String getWanReplicationName() {
        return wanReplicationName;
    }

    public String getWanPublisherId() {
        return wanPublisherId;
    }

    public String getMapName() {
        return mapName;
    }

    @Override
    public JsonObject toJson() {
        JsonObject json = super.toJson();
        json.add("wanReplicationName", wanReplicationName);
        json.add("wanPublisherId", wanPublisherId);
        json.add("mapName", mapName);
        return json;
    }
}
